

#ifndef __SHAREDVALUEMANAGER_H__
#define __SHAREDVALUEMANAGER_H__

#include <export.h>
#include <sharedvalue.h>

#include <map>
#include <vector>

/**
 * @addtogroup engine
 * @{
 */

/**
 * @brief Manager for holding all known iSharedValue elements
 */
class CE_API ceSharedValueManager
{
private:

	std::vector<iSharedValue*>	_values;
  std::map<std::string, int>  _indices;

  static ceSharedValueManager*				static_instance;

public:
  ceSharedValueManager ();

  static ceSharedValueManager* Get ();

	void AddValue (iSharedValue* value);
	int GetIdx (const std::string& name) const;

  iSharedValue* GetValue (const std::string& name);
  iSharedValue* GetValue (int idx);

};

/** @} */

#endif /* ! __SHAREDVALUEMANAGER_H__ */
